import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int len = in.nextInt();
            int windows = in.nextInt();
            int[] happiness = new int[len];
            int[] shame = new int[len];
            for (int i = 0; i < len; i++) {
                happiness[i] = in.nextInt();
            }
            for (int i = 0; i < len; i++) {
                shame[i] = in.nextInt();
            }
            if (len <= windows) {
                System.out.println(1);
                return;
            }
            long maxHappinsess = 0;
            long minShame = 0x3f3f3f3f;
            long windowsHappiness = 0;
            long windowsShame = 0;
            int leftIndex = -1;
            for (int left = 0, right = 0; right < len; right++) {
                windowsHappiness += happiness[right];
                windowsShame += shame[right];
                if (right - left + 1 == windows) {
                    if (windowsHappiness >= maxHappinsess) {
                        // 当幸福度大于maxHappiness的时候，可以直接修改值
                        if (windowsHappiness > maxHappinsess) {
                            minShame = windowsShame;
                            maxHappinsess = windowsHappiness;
                            leftIndex = left + 1;
                        } else if (windowsShame < minShame) {
                            // 如果相等，那么就需要判断羞耻值是否小于记录的最小的羞耻值
                            minShame = windowsShame;
                            leftIndex = left + 1;
                        }
                    }
                    windowsHappiness -= happiness[left];
                    windowsShame -= shame[left];
                    left++;
                }
            }
            System.out.println(leftIndex);
        }
    }
}
